<template>
  <form-item :form-datas = "formDatas" :form-item = "field" :parent-comp-type = "parentCompType"
  >
    <el-input-number
        :controls = "field.preps['controls']"
        :controls-position = "field.preps['controlsPosition']"
        :disabled = "field.preps['disabled']"
        :label = "field.preps['label']"
        :max = "field.preps['max']"
        :min = "field.preps['min']"
        :name = "field.preps['name']"
        :placeholder = "field.preps['placeholder']"
        :precision = "field.preps['precision']"
        :readonly = "field.preps['readonly']"
        :size = "field.preps['size']"
        :step = "field.preps['step']"
        :step-strictly = "field.preps['stepStrictly']"
        :value-on-clear = "field.preps['valueOnClear']"
        v-model = "starHorseDynamicForm[field.preps['name']]"
    />

  </form-item>
</template>

<script>
import FormItem from "./form-item";

export default {
  name: "number-item",
  components: {FormItem},
  props: {
    parentCompType: {type: Object},
    starHorseDynamicForm: {type: Object},
    field: {
      type: Object
    },
    formDatas: {type: Object}
  },
  data() {
    let formItem = {label: "input", required: false};
    return {
      formItem,
      dataField: ""
    }
  },
  methods: {
    selectItem(data) {
      let _this = this;
      _this.$emit("selectItem", data, _this.parentCompType);
    }
  }
}
</script>

<style scoped>

</style>